<!--
 * @name: 
 * @Author: 刘大可
 * @Date: 2023-10-12 12:30:01
 * @LastEditors: 刘大可
 * @LastEditTime: 2023-11-08 17:04:24
-->
<template>
  <div class="list">
      <cu-custom bgColor="bgmain" :isBack="true">
            <view slot="content">榜单列表</view>
        </cu-custom>
        <image
          class="dcrb"
          :src="fileUrl.split('wximages/')[0]+'static/img/bg1231.png'"
          mode="widthFix"
          v-if="fileUrl"
        />
        <view class="tit row">点餐热榜</view>
        <view class="goodsList">

          <block v-for="(item,index) in goodsList" :key="index">
            <view class="goods_item row margin-bottom-sm" 
              @click="goStoreInfoSS( '/gc_school/pages/foold/foold?id=' + item.goods.business_id,item.load_type)"
            >
              <image
                class="mainImg"
                :src="item.goods.goods_img"
                mode="scaleToFill"
              />
              <view class="goods_info">
                <view class="goods_name">{{item.goods.goods_name}} </view>
                <view class="goods_price row">
                  <view class="price">
                    ￥{{item.goods.price}}
                  </view>
                   <!-- <view class="prices">
                    ￥{{item.goods.prices}}
                  </view> -->
                </view>
              </view>
            </view>
          </block>
        </view>

   
  </div>
</template>

<script>
import Vue from 'vue';
export default Vue.extend({
  components: {},
  data() {
    return {
      goodsList:[]
    }
  },
  computed: {},
  methods: {
    initData() {
      this.request("Hotlist/index",{
        s_id:uni.getStorageSync('schoolId'),
		    page:1
      }).then(res=>{
        this.goodsList=res.data.data.list
      })
    }
  },
  watch: {},

  // 页面周期函数--监听页面加载
  onLoad() {
    this.initData()
  },
  // 页面周期函数--监听页面初次渲染完成
  onReady() {},
  // 页面周期函数--监听页面显示(not-nvue)
  onShow() {},
  // 页面周期函数--监听页面隐藏
  onHide() {},
  // 页面周期函数--监听页面卸载
  onUnload() {},
  // 页面处理函数--监听用户下拉动作
  // onPullDownRefresh() { uni.stopPullDownRefresh(); },
  // 页面处理函数--监听用户上拉触底
  // onReachBottom() {},
  // 页面处理函数--监听页面滚动(not-nvue)
  // onPageScroll(event) {},
  // 页面处理函数--用户点击右上角分享
  // onShareAppMessage(options) {},
}) 
</script>

<style scoped lang="scss">
  @import "./list.scss";
</style>